
bool check1(struct TreeNode* l, struct TreeNode* r) {
    if (l == NULL && r == NULL)
        return true;

    if (l == NULL || r == NULL)
        return false;

    if (l->val == r->val)
        return check1(l->left, r->right) && check1(l->right, r->left);
    return false;
}
bool isSymmetric(struct TreeNode* root) {

    bool ret = check1(root, root);
    return ret;

}